package cn.itcast.bos.delivery.service;

import java.util.Date;
import java.util.List;

import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
import javax.ws.rs.core.MediaType;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import cn.itcast.bos.domain.delivery.Promotion;
import cn.itcast.bos.domain.utils.PageBean;

@Path("/")
@Produces({MediaType.APPLICATION_JSON,MediaType.APPLICATION_ATOM_XML})
@Consumes({MediaType.APPLICATION_JSON,MediaType.APPLICATION_ATOM_XML})
public interface PromotionService {

	void save(Promotion t);
	
	void deadJob(Date date);
	Page<Promotion> showPromotion(Pageable pageable);
	
	@GET
	@Path("/promotion")
	public PageBean<Promotion> getPromotion(@QueryParam("rows") int rows,@QueryParam("page") int page);
	
	@GET
	@Path("/promotion/{id}")
	public Promotion getById(@PathParam("id") int id);
	
	@GET
	@Path("/promotion/all")
	public PageBean<Promotion> loadPromotion();
}
